<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BreukenWebsite.Models.Opdracht>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Create Opdracht
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function() {
            $("#opdrachtDatum").datepicker({ dateFormat: 'dd/mm/yy' });
            $("#opdrachtDatum").onkeyup(function() { $("#opdrachtDatum").attr("value","") })
        });
    </script>
    <h2>Create Opdracht</h2>

    <%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend>Fields</legend>
            <p>
                <label for="opdrachtDatum">Datum:</label>
                <%= Html.TextBox("opdrachtDatum") %>
                <%= Html.ValidationMessage("opdrachtDatum", "*") %>
            </p>
            <p>
                <label for="moeilijkheidsGraad">Moeilijkheidsgraad:</label>
                <%= Html.DropDownList("moeilijkheidsGraad", ViewData["moeilijkheidsgraden"] as SelectList)%>
            </p>
            <p>
                <label for="maxScore">Maximumscore:</label>
                <%= Html.DropDownList("maxScore", ViewData["maxscores"] as SelectList)%>
            </p>
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("_IMG_", "Index").Replace("_IMG_", "<img alt=\"Terug\" src=\"../../Content/icons/back.png\"/> Terug")%>
    </div>

</asp:Content>

